package mpc;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.border.BevelBorder;

public class GUIClass {
	
	public final static int MAZE_WIDTH = 16, MAZE_HEIGHT = 16, dWidth = 240, dHeight = 80;
	public static final VirtualField VFIELD = new VirtualField(MAZE_WIDTH, MAZE_HEIGHT);
	public static TableDrawer pan;
	public static ControlPanel cpan;
	public static JFrame frame;
	
	public static void main(String[] args){
		frame = new JFrame("Wave Tracing demonstration");
		//frame.setPreferredSize(new Dimension(970, 910));
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setResizable(false);
		//frame.getGraphics().drawLine(10, 10, 50, 20);
		//DrawingArea pan = new DrawingArea();
		//pan.setPreferredSize(new Dimension(1000, 800));
		//frame.setLayout(new GridLayout(1, 0));
		
		pan = new TableDrawer();
		//pan.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
		cpan = new ControlPanel();
		//cpan.setBorder(BorderFactory.createEmptyBorder());
		
		//frame.repaint();
		
		//pan.setMode(new SetStartMode(pan.getField()));
		frame.getContentPane().add(new MyMenuBar(), BorderLayout.AFTER_LAST_LINE);
		frame.getContentPane().add(pan, BorderLayout.CENTER);
		frame.getContentPane().add(cpan, BorderLayout.AFTER_LINE_ENDS);
		//frame.addMouseListener(pan);
		frame.getContentPane().addMouseListener(pan);
		
		//JMenuBar menuBar = new JMenuBar();
		
		//frame.add(new MyMenuBar(), BorderLayout.BEFORE_FIRST_LINE);
		//frame.addMouseMotionListener(pan);
		frame.pack();
		frame.setSize(MAZE_WIDTH * TableDrawer.SQ_SIZE + dWidth, MAZE_HEIGHT * TableDrawer.SQ_SIZE + dHeight);
		pan.configureMouse();
		frame.setVisible(true);
	}
}
